/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const shoppingRouter = {
  path: '/shopping',
  component: Layout,
  redirect: '/shopping/goods',
  name: 'Shopping',
  meta: {
    title: '商城管理',
  },
  children: [
    {
      path: 'goods',
      component: () => import('@/views/shopping/goods'),
      name: 'Goods',
      meta: { title: '商品管理' },
    },
    {
      path: 'goods_add',
      component: () => import('@/views/shopping/goods_add'),
      name: 'GoodsAdd',
      meta: { title: '增加商品', activeMenu: '/shopping/goods' },
    },
    {
      path: 'goods/:goods_id',
      component: () => import('@/views/shopping/goods_add'),
      name: 'GoodsEdit',
      props: true,
      meta: { title: '修改商品', activeMenu: '/shopping/goods' },
    },
    {
      path: 'category',
      component: () => import('@/views/shopping/category'),
      name: 'Category',
      meta: { title: '商品分类' }
    },
    {
      path: 'gift_pack',
      component: () => import('@/views/shopping/gift_pack'),
      name: 'Gift',
      meta: { title: '赠品礼包' }
    },
  ]
}

export default shoppingRouter
